<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>${title }</title>
	<!--自定义index样式-->
	<link rel="stylesheet" href="${ctx }/static/styles/basic/basic.css" />
	<link rel="stylesheet" href="${ctx }/static/styles/edit/box.css" />
	<!--js库-->
	<%@ include file="/static/commons/jquery-easyui.jsp" %>
	<script language="JavaScript" src="${ctx}/static/widgets/easyui/plugins/jquery.draggable.js"></script>
	<script language="JavaScript" src="${ctx}/static/widgets/easyui/plugins/jquery.droppable.js"></script>
	<script language="JavaScript" src="${ctx}/static/widgets/easyui/plugins/jquery.tree.js"></script>
	<script language="JavaScript" src="${ctx}/static/scripts/set_select.js"></script>
  </head>
  
  <body style="padding-bottom:8px;">
  		<c:set var="em" value="<span>*</span>"></c:set>
  		<c:set var="disabled" value=""></c:set>
  		<c:set var="ifSelect" value=""></c:set>
  		<c:set var="noChange" value=""></c:set>
  		<c:set var="isImportant" value="true"></c:set>
  		<c:if test="${not empty view}">
  			<c:set var="disabled" value="disabled"></c:set>
  			<c:set var="ifSelect" value="false"></c:set>
  			<c:set var="em" value=""></c:set>
  			<c:set var="isImportant" value=""></c:set>
  		</c:if>
  		<c:if test="${not empty dept.dept_id}">
	  		<c:set var="noChange" value="false"></c:set>
  		</c:if>
  		<form id="editForm" action="${ctx}/dept/save" method="post">&nbsp; 
  			<input type="hidden" id="deptId" name="p_deptId" value="${dept.dept_id}">
  			<div class="box">
	  			<table cellspacing="0" cellpadding="0">
	  				<tbody>
	  					<tr>
		  					<td class="message">
								<p><span>*</span>上级部门：</p>
							</td>
							<td colspan="1">
			  					<c:if test="${dept.p_dept_id eq '-1'}">
										无
			  					</c:if>
			  					<c:if test="${dept.parent_dept_id ne '-1'}">
			  						<vvise:select id="pDeptId" name="p_pDeptId" ifTree="true" sqlname="getDeptByUser" className="wd170" width="99%"
			  							default="false" defval="${dept.p_dept_id}" sqlparam="${LoginUser.deptId}" ifSelect="${noChange}"/>
			  					</c:if>
							</td>
		  				</tr>
		  				<tr>
		  					<td class="message">
								<p><span>*</span>部门名称：</p>
							</td>
							<td colspan="1">
								<input type="text" id="deptName" name="p_deptName" value="${dept.dept_name }"
									class="wd170 " maxLength="20" style="width: 100%;" ${disabled} />
							</td>
		  				</tr>
		  				<tr>
							<td class="message">
								<p>状态：</p>
							</td>
							<td>
								<vvise:select id="status" name="p_status" sqlname="getCodeData" className="wd170" width="99%"
	  								defval="${dept.status}" sqlparam="data_status" default="false" ifSelect="${ifSelect}" />
							</td>
						</tr>
		  				<tr>
		  					<td class="message">
								<p>排序：</p>
							</td>
							<td colspan="1">
								<input type="text" id="idxNo" name="p_idxNo" value="${dept.idx_no }"
									class="wd170 " maxLength="20" style="width: 100%;" ${disabled} />
							</td>
		  				</tr>
	  				</tbody>
	  			</table>
        </form>
        <script type="text/javascript">
        $(function(){
        });
        </script>
  </body>
</html>